import { pubRequire } from '@utils/public'
const baseUrl = '/content/labels/recommends'
// 获取推荐列表
export function getRecommentList(obj, callBack, errBack) {
  return pubRequire('get', `${baseUrl}`, obj, callBack, errBack)
}
// 包含内容数
export function count(id, callBack, errBack) {
  return pubRequire('get', `${baseUrl}/${id}`, '', callBack, errBack)
}
// 上移
export function up(topicId, callBack, errBack) {
  return pubRequire('post', `${baseUrl}/${topicId}/up`, '', callBack, errBack)
}
// 下移
export function down(topicId, callBack, errBack) {
  return pubRequire('post', `${baseUrl}/${topicId}/down`, '', callBack, errBack)
}
// 停用
export function stop(topicId, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${topicId}/disable`,
    '',
    callBack,
    errBack
  )
}
// 启用
export function open(topicId, callBack, errBack) {
  return pubRequire(
    'put',
    `${baseUrl}/${topicId}/enable`,
    '',
    callBack,
    errBack
  )
}
//新增
export function add(obj, callBack, errBack) {
  return pubRequire('post', `${baseUrl}`, obj, callBack, errBack)
}
